package com.groupbuying.file.service.impl;

import com.groupbuying.file.pojo.BaseEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.groupbuying.file.dao.OssCatelogDao;
import com.groupbuying.file.domain.OssCatelogDO;
import com.groupbuying.file.service.OssCatelogService;



@Service
public class OssCatelogServiceImpl implements OssCatelogService {
	@Autowired
	private OssCatelogDao ossCatelogDao;
	
	@Override
	public OssCatelogDO get(String uuid){
		return ossCatelogDao.get(uuid);
	}
	
	@Override
	public List<OssCatelogDO> list(Map<String, Object> map){
		return ossCatelogDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return ossCatelogDao.count(map);
	}
	
	@Override
	public int save(OssCatelogDO ossCatelog){
		return ossCatelogDao.save(ossCatelog);
	}
	
	@Override
	public int update(OssCatelogDO ossCatelog){
		return ossCatelogDao.update(ossCatelog);
	}
	
	@Override
	public int remove(String uuid){
		return ossCatelogDao.remove(uuid);
	}
	
	@Override
	public int batchRemove(String[] uuids){
		return ossCatelogDao.batchRemove(uuids);
	}

	@Override
	public OssCatelogDO getCatelogByApplication(String applicationName) {
		Map<String,Object> map = new HashMap<>();
		map.put("delflag", BaseEnum.DEL_FLAG_VALID);
		map.put("applicationName",applicationName);
		return ossCatelogDao.getCatelogByApplication(map);
	}

}
